﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HumanElement.KungFu.CommandConsole
{
    /// <summary>
    /// A Command executed from the prompt of the command console.
    /// </summary>
    public abstract class Command<TCommandType, TCommandProcessor> : ICommand<TCommandType, TCommandProcessor>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="Command&lt;TCommandType, TCommandProcessor&gt;"/> class.
        /// </summary>
        protected Command()
        {
            
        }

        /// <summary>
        /// Gets the artifact.
        /// </summary>
        /// <value>The artifact.</value>
        public string Artifact
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name.</value>
        public string Name
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the arg.
        /// </summary>
        /// <value>The arg.</value>
        public string Arg { get; private set; }

        /// <summary>
        /// Gets the command value.
        /// </summary>
        /// <value>The command value.</value>
        public TCommandType CommandValue { get; private set; }

        /// <summary>
        /// Gets the processor.
        /// </summary>
        /// <value>The processor.</value>
        public TCommandProcessor Processor { get; private set; }

        /// <summary>
        /// Initializes the specified session.
        /// </summary>
        /// <param name="session">The session.</param>
        public virtual void Initialize(CommandSession session)
        {
            
        }

        /// <summary>
        /// Executes this instance.
        /// </summary>
        /// <returns></returns>        
        public abstract bool Execute();
    }

    /// <summary>
    /// public class CommandSession
    /// </summary>
    public sealed class CommandSession 
    {
        public CommandSession()
        {
            
        }
    }
}
